chore(depot): fault injection tests#4868
chore(depot): fault injection tests#4868NathanFlurry wants to merge 27 commits into04-29-feat_sqlite_pitr_forkingfrom
Conversation
|
🚅 Deployed to the rivet-pr-4868 environment in rivet-frontend
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Code Review: chore(depot): fault injection testsThis PR adds a comprehensive fault injection framework for the depot SQLite storage layer, including the controller API, hook sites across commit/read/compaction/reclaim paths, a compaction test driver, and both simple CI tests and a chaos harness. The overall architecture is well-considered. Here are the findings organized by severity. Issues1. In pub async fn wait_reached(&self) {
loop {
let notified = self.state.reached_notify.notified();
if self.state.reached.load(Ordering::SeqCst) {
return;
}
notified.await;
}
}The same pattern applies to 2.
3. Guard types are not marked
4. A single rule targeting those points will fire on either path, making test assertions ambiguous when both activities run in the same compaction cycle. Consider adding an 5. The Code Quality Observations6. Variable shadowing for The 7. Three
8. Repeated All 9. The caller must Minor / Nit10. Add a guard near the top of the metadata section to produce a clear error in restricted CI environments instead of a confusing 11. Use 12. An explicit Test Coverage AssessmentCoverage is strong for implemented fault points: pre-durable commit faults, ambiguous post-durable commit faults, hot install after shard publish, cold upload-succeeds-publish-fails, and forced reclaim with short grace. Chaos tests are appropriately Gaps to note for follow-up:
SummaryThe most important issue to address before merge is the |

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: